<script type="text/javascript">		
    $(document).ready(function(){       
		
        $("#make").change(function(){
            var make_id = $(this).val();
                     
			
            var url = '<?php echo osc_ajax_plugin_url('cars_attributes/ajax.php') . '&makeId='; ?>' + make_id;
            var result = '';
            if(make_id != '') {
                $("#model").attr('disabled',false);
                $.ajax({
                    type: "POST",
                    url: url,
                    dataType: 'json',
                    success: function(data){
                        var length = data.length;
                        if(length > 0) {
                            result += '<option value="" selected><?php _e('Select a model', 'cars_attributes'); ?></option>';
                            for(key in data) {
                                result += '<option value="' + data[key].pk_i_id + '">' + data[key].s_name + '</option>';
                            }
                            result += '<option value="-1"><?php _e("Others", 'cars_attributes'); ?></option>';
                            
                            $("#modelPnl").css("display","");         
                           // $("#titleAuxPnl").css("display","none");                            
                            
                        } else {
                            result += '<option value=""><?php _e('No results', 'cars_attributes'); ?></option>';
                                                                         
                            $("#titleAuxPnl").css("display","");
                            $("#modelPnl").css("display","none");
                            //validar titleAux y no model
                        }
                        $("#model").html(result);
                    }
                 });                
                
                 
             } else {
                result += '<option value="" selected><?php _e('Select a model', 'cars_attributes'); ?></option>';
                $("#model").attr('disabled',true);
                $("#model").html(result);
             }
             
            /*if(make_id==-1)
            {
                 $("#MakeModelLbl").css("display", "");
                 $("#ModelLbl").css("display", "none");
            }
            else
            {
                $("#MakeModelLbl").css("display", "none");
                $("#ModelLbl").css("display", "");   
            } */ 
        });
        
       /* $("#model").change(function(){
        
            if($(this).val() == -1)
            {
                 $("#MakeModelLbl").css("display", "none");
                 $("#ModelLbl").css("display", "");
                 $("#titleAuxPnl").css("display","");
            }        
            else
            {
                 $("#titleAuxPnl").css("display","none");    
            }
        });*/
                
       numericInput('mileage');
       numericInput('payload');
       
    });
    
 

</script>

<div>
    <div id="makePnl" >
        <?php
            if( Session::newInstance()->_getForm('pc_make') != '' ) {
                $detail['fk_i_make_id'] = Session::newInstance()->_getForm('pc_make');
            }
        ?>
	<div class="clearfix">
        <label id="brandMan"><?php _e('Brand Manufacturer', 'cars_attributes'); ?></label>
        <label id="trailerType" style="display:none;"><?php _e('Type and work use', 'cars_attributes'); ?></label>
        <label id="busMan" style="display:none;"><?php _e('Mini Bus Manufacturer', 'cars_attributes'); ?></label>
		<div class="input" id="makeInput">
			<select name="make" id="make" >
				<option value=""><?php _e('Select brand manufacturer', 'cars_attributes'); ?></option>
				<?php foreach($makes as $a){ 
                                 $mkId = @$detail['fk_i_make_id'];   
                                 if ($mkId == null) $mkId = -1;
                                ?>
                                
				<option value="<?php echo $a['pk_i_id']; ?>" <?php if(@$detail['fk_i_make_id'] == $a['pk_i_id']) { echo 'selected'; } ?>><?php echo $a['s_name']; ?></option>
				<?php } ?>
                                <option value="-1" <?php if($mkId == -1) { echo 'selected'; } ?>><?php _e('Others', 'cars_attributes'); ?></option>
			</select>
			<span id="makeVal" class="field-validation-valid" data-valmsg-replace="false" data-valmsg-for="make"><?php _e('Select your vehicle make here', 'cars_attributes'); ?></span>
		</div>
	</div>
    </div>
    
    <div id="modelPnl"
         <?php if(count($models) <=0) echo "style='display:none;'"; ?>>
        <?php
            if( Session::newInstance()->_getForm('pc_model') != '' ) {
                $detail['fk_i_model_id'] = Session::newInstance()->_getForm('pc_model');
            }
        ?>
        <div class="clearfix">          
        <label><?php _e('Model', 'cars_attributes'); ?></label>
		
		<div class="input" id="modelInput">
			<select name="model" id="model" <?php if(@$detail['fk_i_model_id'] == '') { echo 'disabled="disabled"'; } ?>>
				<option value="" selected><?php _e('Select a model', 'cars_attributes'); ?></option>
				<?php foreach($models as $a) { 
                                    $mdId = @$detail['fk_i_model_id'];   
                                 if ($mdId == null) $mdId = -1;?>
				<option value="<?php echo $a['pk_i_id']; ?>" <?php if(@$detail['fk_i_model_id'] == $a['pk_i_id']) { echo 'selected'; } ?>><?php echo $a['s_name']; ?></option>
				<?php } ?>
                                 <option value="-1" <?php if($mdId == -1) { echo 'selected'; } ?>><?php _e('Others', 'cars_attributes'); ?></option>
			</select>
			<span id="modelVal" class="field-validation-valid" data-valmsg-replace="false" data-valmsg-for="model"><?php _e('Select your vehicle model here', 'cars_attributes'); ?></span>		
		</div>
		<span class="help-block" style="margin-left: 150px;">
                    <?php _e("<strong>Note:</strong> Select first your vehicle make (up).", 'cars_attributes') ; ?>
		</span>
        </div>
    </div>	
    
    <div id="typePnl" style="display:none;">	
        <?php $locales = osc_get_locales();
        if( Session::newInstance()->_getForm('pc_car_type') != '' ) {
            $detail['fk_vehicle_type_id'] = Session::newInstance()->_getForm('pc_car_type');
        }
        //if(count($locales)==1) {
            $locale = $locales[0]; ?>
            <p>
                <label><?php _e('Car type', 'cars_attributes'); ?></label>
                <select name="car_type" id="car_type">
                    <option value="" selected><?php _e('Select a car type', 'cars_attributes'); ?></option>
                    <?php foreach($car_types[$locale['pk_c_code']] as $k => $v) { ?>
                    <option value="<?php echo  $k; ?>" <?php if(@$detail['fk_vehicle_type_id'] == $k) { echo 'selected'; } ?>><?php echo @$v; ?></option>
                    <?php } ?>
                </select>
            </p>        
    </div>
    
    <div id="titleAuxPnl">
         <?php
            if( Session::newInstance()->_getForm('pc_descaux') != '' ) {
                $detail['s_descaux'] = Session::newInstance()->_getForm('pc_descaux');
            }
        ?>
        <div  class="clearfix" >
            <label><?php _e('Type in the automotive model', 'cars_attributes'); ?></label>
            <div class="input" id="titleAuxInput" >
                <input type="text" name="descaux" id="descaux" class="xlarge" value="<?php echo @$detail['s_descaux']; ?>" maxlength="255"/>
            </div>
        </div>
    </div>
    
    <div id="mileagePnl">
        <?php
            if( Session::newInstance()->_getForm('pc_mileage') != '' ) {
                $detail['i_mileage'] = Session::newInstance()->_getForm('pc_mileage');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Type in vehicle total kilometers', 'cars_attributes'); ?></label>
			<div class="input">
			<input type="text" name="mileage" id="mileage" value="<?php echo @$detail['i_mileage']; ?>" maxlength="6"/> km
			</div>
		</div>
    </div>
    
    <div id="registrationPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_registration') != '' ) {
                $detail['i_registration'] = Session::newInstance()->_getForm('pc_registration');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select 1st registration year', 'cars_attributes'); ?></label></label>
			<div class="input" id="registrationInput">
			<!--<input type="text" name="registration" id="registration" value="<?php //echo @$detail['i_registration']; ?>" size=4 />-->
			<select name="registration" id="registration">
			<option value=""><?php _e('Select 1st registration year', 'cars_attributes'); ?></option>
			<?php combo_year($detail['i_registration']);	?>
			</select>
			<span id="registrationVal" class="field-validation-valid" data-valmsg-replace="false" data-valmsg-for="make"><?php _e('Select your vehicle registration year', 'cars_attributes'); ?> </span>
			</div>
		</div>
    </div>
    
    <div id="inspectionPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_inspection') != '' ) {
                $detail['e_inspection'] = Session::newInstance()->_getForm('pc_inspection');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select vehicle last inspection', 'cars_attributes'); ?> </label>
			<div class="input">
			<select name="inspection" id="inspection">
				<option value=""><?php _e('Select vehicle last inspection', 'cars_attributes'); ?></option>
				<option value="within1month" <?php if(@$detail['e_inspection'] == 'within1month') { echo 'selected'; } ?>><?php _e('Within 1 month', 'cars_attributes'); ?> </option>
				<option value="within2months" <?php if(@$detail['e_inspection'] == 'within2months') { echo 'selected'; } ?>><?php _e('Within 2 months', 'cars_attributes'); ?> </option>
                                <option value="within3months" <?php if(@$detail['e_inspection'] == 'within3months') { echo 'selected'; } ?>><?php _e('Within 3 months', 'cars_attributes'); ?> </option>
                                <option value="within6months" <?php if(@$detail['e_inspection'] == 'within6months') { echo 'selected'; } ?>><?php _e('Within 6 months', 'cars_attributes'); ?> </option>
                                <option value="within9months" <?php if(@$detail['e_inspection'] == 'within9months') { echo 'selected'; } ?>><?php _e('Within 9 months', 'cars_attributes'); ?> </option>
                                <option value="within12months" <?php if(@$detail['e_inspection'] == 'within12months') { echo 'selected'; } ?>><?php _e('Within 12 months', 'cars_attributes'); ?> </option>
                                <option value="within18months" <?php if(@$detail['e_inspection'] == 'within18months') { echo 'selected'; } ?>><?php _e('Within 18 months', 'cars_attributes'); ?> </option>
                                <option value="within24months" <?php if(@$detail['e_inspection'] == 'within24months') { echo 'selected'; } ?>><?php _e('Within 24 months', 'cars_attributes'); ?> </option>
                                <option value="mustbeinspected" <?php if(@$detail['e_inspection'] == 'mustbeinspected') { echo 'selected'; } ?>><?php _e('Must be inspected', 'cars_attributes'); ?> </option>
                                <option value="tempinspected" <?php if(@$detail['e_inspection'] == 'tempinspected') { echo 'selected'; } ?>><?php _e('Temporary inspected', 'cars_attributes'); ?> </option>
			</select>
			</div>
		</div>
    </div>
    
    <div id="fuelPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_fuel') != '' ) {
                $detail['e_fuel'] = Session::newInstance()->_getForm('pc_fuel');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select vehicle fuel type', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="fuel" id="fuel">
				<option value=""><?php _e('Select vehicle fuel type', 'cars_attributes'); ?></option>
				<option value="diesel" <?php if(@$detail['e_fuel'] == 'diesel') { echo 'selected'; } ?>><?php _e('Diesel', 'cars_attributes'); ?></option>
                                <option value="hybrid" <?php if(@$detail['e_fuel'] == 'hybrid') { echo 'selected'; } ?>><?php _e('Hybrid', 'cars_attributes'); ?></option>
				<option value="gasoline" <?php if(@$detail['e_fuel'] == 'gasoline') { echo 'selected'; } ?>><?php _e('Gasoline', 'cars_attributes'); ?></option>
				<option value="electricity" <?php if(@$detail['e_fuel'] == 'electricity') { echo 'selected'; } ?>><?php _e('Electricity', 'cars_attributes'); ?></option>
				<option value="biofueldiv" <?php if(@$detail['e_fuel'] == 'biofueldiv') { echo 'selected'; } ?>><?php _e('Bio fuel Div.', 'cars_attributes'); ?></option>
				<option value="solarandpedals" <?php if(@$detail['e_fuel'] == 'solarandpedals') { echo 'selected'; } ?>><?php _e('Solar and pedals ;-)', 'cars_attributes'); ?></option>
			</select>
			</div>
		</div>
    </div>
    
    <div id="emissionPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_emission') != '' ) {
                $detail['i_emission'] = Session::newInstance()->_getForm('pc_emission');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select EU emission class', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="emission" id="emission">
			<option value=""><?php _e('Select EU emission class', 'cars_attributes'); ?></option>
				<?php foreach(range(1, 6) as $n) { ?>
				<option value="<?php echo $n; ?>" <?php if(@$detail['i_emission'] == $n) { echo 'selected'; } ?>><?php echo $n; ?></option>
				<?php } ?>
			</select>
			</div>
		</div>
    </div>
    
    <div id="vansweightPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_vansweight') != '' ) {
                $detail['e_vansweight'] = Session::newInstance()->_getForm('pc_vansweight');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select taxed total weight', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="vansweight" id="vansweight">
                            <option value=""><?php _e('Select taxed total weight', 'cars_attributes'); ?></option>
			    <option value="from0000to1000" <?php if(@$detail['e_vansweight'] == 'from0000to1000') { echo 'selected'; } ?>><?php _e('From 0000 to 1000', 'cars_attributes'); ?></option>
                            <option value="from1001to2000" <?php if(@$detail['e_vansweight'] == 'from1001to2000') { echo 'selected'; } ?>><?php _e('From 1001 to 2000', 'cars_attributes'); ?></option>
                            <option value="from2001to2500" <?php if(@$detail['e_vansweight'] == 'from2001to2500') { echo 'selected'; } ?>><?php _e('From 2001 to 2500', 'cars_attributes'); ?></option>
                            <option value="from2501to3000" <?php if(@$detail['e_vansweight'] == 'from2501to3000') { echo 'selected'; } ?>><?php _e('From 2501 to 3000', 'cars_attributes'); ?></option>
                            <option value="from3001to3500" <?php if(@$detail['e_vansweight'] == 'from3001to3500') { echo 'selected'; } ?>><?php _e('From 3001 to 3500', 'cars_attributes'); ?></option>
			
			</select>
			</div>
		</div>
    </div>	
    <div id="trailerweightPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_trailerweight') != '' ) {
                $detail['e_trailerweight'] = Session::newInstance()->_getForm('pc_trailerweight');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select taxed total weight', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="trailerweight" id="trailerweight">
                            <option value=""><?php _e('Select taxed total weight', 'cars_attributes'); ?></option>
			    <option value="from0to500" <?php if(@$detail['e_trailerweight'] == 'from0to500') { echo 'selected'; } ?>><?php _e('From 0 to 500', 'cars_attributes'); ?></option>
                            <option value="from501to1000" <?php if(@$detail['e_trailerweight'] == 'from501to1000') { echo 'selected'; } ?>><?php _e('From 501 to 1000', 'cars_attributes'); ?></option>
                            <option value="from1001to2000" <?php if(@$detail['e_trailerweight'] == 'from1001to2000') { echo 'selected'; } ?>><?php _e('From 1001 to 2000', 'cars_attributes'); ?></option>
                            <option value="from2001to2500" <?php if(@$detail['e_trailerweight'] == 'from2001to2500') { echo 'selected'; } ?>><?php _e('From 2001 to 2500', 'cars_attributes'); ?></option>
                            <option value="from2501to3000" <?php if(@$detail['e_trailerweight'] == 'from2501to3000') { echo 'selected'; } ?>><?php _e('From 2501 to 3000', 'cars_attributes'); ?></option>                            
                            <option value="from3001to3500" <?php if(@$detail['e_trailerweight'] == 'from3001to3500') { echo 'selected'; } ?>><?php _e('From 3001 to 3500', 'cars_attributes'); ?></option>
                            <option value="minisemitrailerbe5000" <?php if(@$detail['e_trailerweight'] == 'minisemitrailerbe5000') { echo 'selected'; } ?>><?php _e('Mini Semitrailer be 5000', 'cars_attributes'); ?></option>                            
			</select>
			</div>
		</div>
    </div>
     <div id="busweightPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_busweight') != '' ) {
                $detail['e_busweight'] = Session::newInstance()->_getForm('pc_busweight');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select taxed *own* weight', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="busweight" id="busweight">
                            <option value=""><?php _e('Select taxed total weight', 'cars_attributes'); ?></option>
			    <option value="from0000to1300" <?php if(@$detail['e_busweight'] == 'from0000to1300') { echo 'selected'; } ?>><?php _e('From 0000 to 1300', 'cars_attributes'); ?></option>
                            <option value="from1301to1500" <?php if(@$detail['e_busweight'] == 'from1301to1500') { echo 'selected'; } ?>><?php _e('From 1301 to 1500', 'cars_attributes'); ?></option>
                            <option value="from1501to2000" <?php if(@$detail['e_busweight'] == 'from1501to2000') { echo 'selected'; } ?>><?php _e('From 1501 to 2000', 'cars_attributes'); ?></option>
                            <option value="from2001to3000" <?php if(@$detail['e_busweight'] == 'from2001to3000') { echo 'selected'; } ?>><?php _e('From 2001 to 3000', 'cars_attributes'); ?></option>
                            <option value="from3001to3500" <?php if(@$detail['e_busweight'] == 'from3001to3500') { echo 'selected'; } ?>><?php _e('From 3001 to 3500', 'cars_attributes'); ?></option>                            
                           </select>
			</div>
		</div>
    </div>
    <div id="axlesPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_axles') != '' ) {
                $detail['i_axles'] = Session::newInstance()->_getForm('pc_axles');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select number of axles', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="axles" id="axles">
			<option value=""><?php _e('Select axles', 'cars_attributes'); ?></option>
				<?php foreach(range(1, 3) as $n) { ?>
				<option value="<?php echo $n; ?>" <?php if(@$detail['i_axles'] == $n) { echo 'selected'; } ?>><?php echo $n; ?></option>
				<?php } ?>
			</select>
			</div>
		</div>
    </div>
    
    <div id="taxationPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_taxation') != '' ) {
                $detail['e_taxation'] = Session::newInstance()->_getForm('pc_taxation');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select allowed drive taxation', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="taxation" id="taxation">
                            <option value=""><?php _e('Select allowed drive taxation', 'cars_attributes'); ?></option>
			    <option value="privatecompany" <?php if(@$detail['e_taxation'] == 'privatecompany') { echo 'selected'; } ?>><?php _e('Private & Company', 'cars_attributes'); ?></option>
                            <option value="companysonly" <?php if(@$detail['e_taxation'] == 'companysonly') { echo 'selected'; } ?>><?php _e('Companys Only', 'cars_attributes'); ?></option>
                            <option value="norestrictions" <?php if(@$detail['e_taxation'] == 'norestrictions') { echo 'selected'; } ?>><?php _e('No restrictions', 'cars_attributes'); ?></option>
                            <option value="private" <?php if(@$detail['e_taxation'] == 'private') { echo 'selected'; } ?>><?php _e('Private', 'cars_attributes'); ?></option>
                        </select>
			</div>
		</div>
    </div>
    <div id="brakesPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_brakes') != '' ) {
                $detail['e_brakes'] = Session::newInstance()->_getForm('pc_brakes');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select type of brakes', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="brakes" id="brakes">
                            <option value=""><?php _e('Select brakes', 'cars_attributes'); ?></option>
			    <option value="inertia" <?php if(@$detail['e_brakes'] == 'inertia') { echo 'selected'; } ?>><?php _e('Inertia', 'cars_attributes'); ?></option>
                            <option value="electric" <?php if(@$detail['e_brakes'] == 'electric') { echo 'selected'; } ?>><?php _e('Electric', 'cars_attributes'); ?></option>
                            <option value="hydraulic" <?php if(@$detail['e_brakes'] == 'hydraulic') { echo 'selected'; } ?>><?php _e('Hydraulic', 'cars_attributes'); ?></option>
                            <option value="twocircuitair" <?php if(@$detail['e_brakes'] == 'twocircuitair') { echo 'selected'; } ?>><?php _e('Two circuit air', 'cars_attributes'); ?></option>			
			</select>
			</div>
		</div>
    </div>    
    <div id="cabPnl">
        <?php if( Session::newInstance()->_getForm('pc_cab') != '' ) {
                $detail['e_cab'] = Session::newInstance()->_getForm('pc_cab');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select type of cabine', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="cab" id="cab">
				<option value=""><?php _e('Select type of cabine', 'cars_attributes'); ?></option>
				<option value="singlecabine" <?php if(@$detail['e_cab'] == 'singlecabine') { echo 'selected'; } ?>><?php _e('Single cabine', 'cars_attributes'); ?> </option>
				<option value="quartcabine" <?php if(@$detail['e_cab'] == 'quartcabine') { echo 'selected'; } ?>><?php _e('Quart cabine', 'cars_attributes'); ?> </option>
				<option value="doublecabine" <?php if(@$detail['e_cab'] == 'doublecabine') { echo 'selected'; } ?>><?php _e('Double cabine', 'cars_attributes'); ?> </option>
			</select>
			</div>
		</div>
    </div> 
     <div id="buscabPnl">
        <?php if( Session::newInstance()->_getForm('pc_buscab') != '' ) {
                $detail['e_buscab'] = Session::newInstance()->_getForm('pc_buscab');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select type cabine in mini bus', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="buscab" id="buscab">
				<option value=""><?php _e('Select cabine', 'cars_attributes'); ?></option>
				<option value="deluxecabinelow" <?php if(@$detail['e_buscab'] == 'deluxecabinelow') { echo 'selected'; } ?>><?php _e('Deluxe cabine low', 'cars_attributes'); ?> </option>
				<option value="deluxecabinehigh" <?php if(@$detail['e_buscab'] == 'deluxecabinehigh') { echo 'selected'; } ?>><?php _e('Deluxe cabine high', 'cars_attributes'); ?> </option>
				<option value="standardcabinelow" <?php if(@$detail['e_buscab'] == 'standardcabinelow') { echo 'selected'; } ?>><?php _e('Standard cabine low', 'cars_attributes'); ?> </option>
                                <option value="standardcabinehigh" <?php if(@$detail['e_buscab'] == 'standardcabinehigh') { echo 'selected'; } ?>><?php _e('Standard cabine high', 'cars_attributes'); ?> </option>
				<option value="lowwwheelchairlift" <?php if(@$detail['e_buscab'] == 'lowwwheelchairlift') { echo 'selected'; } ?>><?php _e('Low w/ wheelchairlift', 'cars_attributes'); ?> </option>
                                <option value="highwwheelchairlift" <?php if(@$detail['e_buscab'] == 'highwwheelchairlift') { echo 'selected'; } ?>><?php _e('High w/ wheelchairlift', 'cars_attributes'); ?> </option>
				<option value="schoolcrewcabinelow" <?php if(@$detail['e_buscab'] == 'schoolcrewcabinelow') { echo 'selected'; } ?>><?php _e('School / Crew cabine low', 'cars_attributes'); ?> </option>
                                <option value="schoolcrewcabinehigh" <?php if(@$detail['e_buscab'] == 'schoolcrewcabinehigh') { echo 'selected'; } ?>><?php _e('School / crew cabine high', 'cars_attributes'); ?> </option>
                                <option value="anothertypeofcabine" <?php if(@$detail['e_buscab'] == 'anothertypeofcabine') { echo 'selected'; } ?>><?php _e('Another type of cabine', 'cars_attributes'); ?> </option>
                        </select>
			</div>
		</div>
    </div> 
    <div id="seatsPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_seats') != '' ) {
                $detail['i_seats'] = Session::newInstance()->_getForm('pc_seats');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select number of seats', 'cars_attributes'); ?></label>
			<div class="input">
			<select name="seats" id="seats">
			<option value=""><?php _e('Select num. of seats', 'cars_attributes'); ?></option>
				<?php foreach(range(1, 9) as $n) { ?>
				<option value="<?php echo $n; ?>" <?php if(@$detail['i_seats'] == $n) { echo 'selected'; } ?>><?php echo $n; ?></option>
				<?php } ?>
			</select>
			</div>
		</div>
    </div>
    
    <div id="bodytypePnl">
        <?php
            if( Session::newInstance()->_getForm('pc_bodytype') != '' ) {
                $detail['e_body'] = Session::newInstance()->_getForm('pc_bodytype');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select the body load type', 'cars_attributes'); ?> </label>
			<div class="input">
			<select name="bodytype" id="bodytype">
				<option value=""><?php _e('Select the body type', 'cars_attributes'); ?></option>
				<option value="chassisnaked" <?php if(@$detail['e_body'] == 'chassisnaked') { echo 'selected'; } ?>><?php _e('Chassis naked', 'cars_attributes'); ?> </option>
				<option value="boxwcooldoors" <?php if(@$detail['e_body'] == 'boxwcooldoors') { echo 'selected'; } ?>><?php _e('Box w/cool+doors', 'cars_attributes'); ?> </option>	
                                <option value="boxwcooldoorslift" <?php if(@$detail['e_body'] == 'boxwcooldoorslift') { echo 'selected'; } ?>><?php _e('Box w/cool+doors+lift', 'cars_attributes'); ?> </option>
				<option value="boxwdoorrear" <?php if(@$detail['e_body'] == 'boxwdoorrear') { echo 'selected'; } ?>><?php _e('Box w/doors.rear', 'cars_attributes'); ?> </option>	
                                <option value="boxwdorelif" <?php if(@$detail['e_body'] == 'boxwdorelif') { echo 'selected'; } ?>><?php _e('Box w/doors.rear+lif', 'cars_attributes'); ?> </option>
				<option value="boxwsiderear" <?php if(@$detail['e_body'] == 'boxwsiderear') { echo 'selected'; } ?>><?php _e('Box w/doors.side+rear', 'cars_attributes'); ?> </option>	
                                <option value="boxwsirelif" <?php if(@$detail['e_body'] == 'boxwsirelif') { echo 'selected'; } ?>><?php _e('Box w/doors.si+re+lift', 'cars_attributes'); ?> </option>
				<option value="boxwhorseoption" <?php if(@$detail['e_body'] == 'boxwhorseoption') { echo 'selected'; } ?>><?php _e('Box w/horse option', 'cars_attributes'); ?> </option>	
                                <option value="closedtarpaulin" <?php if(@$detail['e_body'] == 'closedtarpaulin') { echo 'selected'; } ?>><?php _e('Closed tarpaulin', 'cars_attributes'); ?> </option>
				<option value="closedtarpaulinlift" <?php if(@$detail['e_body'] == 'closedtarpaulinlift') { echo 'selected'; } ?>><?php _e('Closed tarpaulin+lift', 'cars_attributes'); ?> </option>	
                                <option value="closedtarpaulinslide" <?php if(@$detail['e_body'] == 'closedtarpaulinslide') { echo 'selected'; } ?>><?php _e('Closed tarpaulin+slide', 'cars_attributes'); ?> </option>
				<option value="closedtarpaulinrool" <?php if(@$detail['e_body'] == 'closedtarpaulinrool') { echo 'selected'; } ?>><?php _e('Closed tarpaulin+roll', 'cars_attributes'); ?> </option>	
                                <option value="followcarbuildup" <?php if(@$detail['e_body'] == 'followcarbuildup') { echo 'selected'; } ?>><?php _e('Follow car build op', 'cars_attributes'); ?> </option>
				<option value="minisemitractor" <?php if(@$detail['e_body'] == 'minisemitractor') { echo 'selected'; } ?>><?php _e('Mini semi tractor BE', 'cars_attributes'); ?> </option>	
                                <option value="opentoautotransport" <?php if(@$detail['e_body'] == 'opentoautotransport') { echo 'selected'; } ?>><?php _e('Open autotransport', 'cars_attributes'); ?> </option>
				<option value="openwithcrane" <?php if(@$detail['e_body'] == 'openwithcrane') { echo 'selected'; } ?>><?php _e('Open w/crane', 'cars_attributes'); ?> </option>	
                                <option value="openwithdump" <?php if(@$detail['e_body'] == 'openwithdump') { echo 'selected'; } ?>><?php _e('Open w/dump', 'cars_attributes'); ?> </option>
				<option value="openwithsides" <?php if(@$detail['e_body'] == 'openwithsides') { echo 'selected'; } ?>><?php _e('Open w/sides', 'cars_attributes'); ?> </option>	
                                <option value="openwtank" <?php if(@$detail['e_body'] == 'openwtank') { echo 'selected'; } ?>><?php _e('Open w/tank', 'cars_attributes'); ?> </option>
				<option value="openworkplatform" <?php if(@$detail['e_body'] == 'openworkplatform') { echo 'selected'; } ?>><?php _e('Open w/workplatform', 'cars_attributes'); ?> </option>	
                                <option value="panelshort" <?php if(@$detail['e_body'] == 'panelshort') { echo 'selected'; } ?>><?php _e('Panel short', 'cars_attributes'); ?> </option>
				<option value="panelmiddle" <?php if(@$detail['e_body'] == 'panelmiddle') { echo 'selected'; } ?>><?php _e('Panel middle', 'cars_attributes'); ?> </option>	
                                <option value="panellong" <?php if(@$detail['e_body'] == 'panellong') { echo 'selected'; } ?>><?php _e('Panel long', 'cars_attributes'); ?> </option>
				<option value="panelextralong" <?php if(@$detail['e_body'] == 'panelextralong') { echo 'selected'; } ?>><?php _e('Panel extralong', 'cars_attributes'); ?> </option>	
                                <option value="panelpacketbuildup" <?php if(@$detail['e_body'] == 'panelpacketbuildup') { echo 'selected'; } ?>><?php _e('Panel packet build up', 'cars_attributes'); ?> </option>
				<option value="panelracingbuildup" <?php if(@$detail['e_body'] == 'panelracingbuildup') { echo 'selected'; } ?>><?php _e('Panel racing build up', 'cars_attributes'); ?> </option>	
                                <option value="panelwwindows" <?php if(@$detail['e_body'] == 'panelwwindows') { echo 'selected'; } ?>><?php _e('Panel w/windows', 'cars_attributes'); ?> </option>
				<option value="salvagediv" <?php if(@$detail['e_body'] == 'salvagediv') { echo 'selected'; } ?>><?php _e('Salvage div.', 'cars_attributes'); ?> </option>	
				<option value="smalldeliverytype" <?php if(@$detail['e_body'] == 'smalldeliverytype') { echo 'selected'; } ?>><?php _e('Small delivery van', 'cars_attributes'); ?> </option>	
                                <option value="smallpersontype" <?php if(@$detail['e_body'] == 'smallpersontype') { echo 'selected'; } ?>><?php _e('Small person van', 'cars_attributes'); ?> </option>
			</select>
			</div>
		</div>
    </div>
    
    <div id="suspensionPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_suspension') != '' ) {
                $detail['e_suspension'] = Session::newInstance()->_getForm('pc_suspension');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select type of suspension', 'cars_attributes'); ?> </label>
			<div class="input">
			<select name="suspension" id="suspension">
				<option value=""><?php _e('Select type of suspension', 'cars_attributes'); ?></option>
				<option value="airallaxles" <?php if(@$detail['e_suspension'] == 'airallaxles') { echo 'selected'; } ?>><?php _e('Air on all axles', 'cars_attributes'); ?> </option>
				<option value="springallaxles" <?php if(@$detail['e_suspension'] == 'springallaxles') { echo 'selected'; } ?>><?php _e('Spring on all axles', 'cars_attributes'); ?> </option>	
                                <option value="airspringonaxles" <?php if(@$detail['e_suspension'] == 'airspringonaxles') { echo 'selected'; } ?>><?php _e('Air+spring on axles', 'cars_attributes'); ?> </option>
				<option value="swingrubberonaxles" <?php if(@$detail['e_suspension'] == 'swingrubberonaxles') { echo 'selected'; } ?>><?php _e('Swing+rubber on axles', 'cars_attributes'); ?> </option>	
			</select>
			</div>
		</div>
    </div>
    
    <div id="payloadPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_payload') != '' ) {
                $detail['i_payload'] = Session::newInstance()->_getForm('pc_payload');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Type in legal payload capacity', 'cars_attributes'); ?></label>
			<div class="input">
			<input type="text" name="payload" id="payload" value="<?php echo @$detail['i_payload']; ?>" maxlength="6" /> kg
			</div>
		</div>
    </div>
    
    <div id="trailertowbarPnl">
        <?php
            if( Session::newInstance()->_getForm('pc_trailertowbar') != '' ) {
                $detail['e_trailertowbar'] = Session::newInstance()->_getForm('pc_trailertowbar');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Select if there is trailer towbar', 'cars_attributes'); ?> </label>
			<div class="input">
			<select name="trailertowbar" id="trailertowbar">
				<option value=""><?php _e('Select if there is trailer towbar', 'cars_attributes'); ?></option>
				<option value="no" <?php if(@$detail['e_trailertowbar'] == 'no') { echo 'selected'; } ?>><?php _e('No', 'cars_attributes'); ?> </option>
				<option value="yes1" <?php if(@$detail['e_trailertowbar'] == 'yes1') { echo 'selected'; } ?>><?php _e('Yes with std. ball', 'cars_attributes'); ?> </option>	
                                <option value="yes2" <?php if(@$detail['e_trailertowbar'] == 'yes2') { echo 'selected'; } ?>><?php _e('Yes with ball + eye', 'cars_attributes'); ?> </option>
                        </select>
			</div>
		</div>
    </div>
   
    <div id="powerPnl" style="display:none;">
        <?php
            if( Session::newInstance()->_getForm('pc_power_unit') != '' ) {
                $detail['e_power_unit'] = Session::newInstance()->_getForm('pc_power_unit');
            }
            if( Session::newInstance()->_getForm('pc_power') != '' ) {
                $detail['i_power'] = Session::newInstance()->_getForm('pc_power');
            }
        ?>
		<div class="clearfix">
			<label><?php _e('Power', 'cars_attributes'); ?></label>
			<div class="input">
			<input type="text" name="power" id="power" value="<?php echo @$detail['i_power']; ?>" maxlength="6"/>
			<select name="power_unit" id="power_unit" style="width:65px">
				<option value="KW" <?php if(@$detail['e_power_unit'] == 'KW') { echo 'selected'; } ?>><?php _e('Kw', 'cars_attributes'); ?></option>
				<option value="CV" <?php if(@$detail['e_power_unit'] == 'CV') { echo 'selected'; } ?>><?php _e('Cv', 'cars_attributes'); ?></option>
				<option value="CH" <?php if(@$detail['e_power_unit'] == 'CH') { echo 'selected'; } ?>><?php _e('Ch', 'cars_attributes'); ?></option>				
				<option value="HP" <?php if(@$detail['e_power_unit'] == 'HP') { echo 'selected'; } ?>><?php _e('Hp', 'cars_attributes'); ?></option>
				<option value="PS" <?php if(@$detail['e_power_unit'] == 'PS') { echo 'selected'; } ?>><?php _e('Ps', 'cars_attributes'); ?></option>
				<option value="PK" <?php if(@$detail['e_power_unit'] == 'PK') { echo 'selected'; } ?>><?php _e('Pk', 'cars_attributes'); ?></option>
				<option value="CP" <?php if(@$detail['e_power_unit'] == 'CP') { echo 'selected'; } ?>><?php _e('Cp', 'cars_attributes'); ?></option>
			</select>
			</div>
		</div>
    </div>   
   
    <div id="warrantyPnl" style="display:none;">
        <?php
            if( Session::newInstance()->_getForm('pc_warranty') != '' ) {
                $detail['b_warranty'] = Session::newInstance()->_getForm('pc_warranty');
            }
        ?>
		<div class="clearfix">
			<span style="margin-left:10px;">
			<input type="checkbox" name="warranty" id="warranty" value="1" <?php if(@$detail['b_warranty'] == 1) { echo 'checked="yes"'; } ?> /> 
			</span>
			<label><?php _e('Warranty', 'cars_attributes'); ?></label>
			
		</div>
    </div>
	
    <div id="newPnl" style="display:none;">
        <?php
            if( Session::newInstance()->_getForm('pc_new') != '' ) {
                $detail['b_new'] = Session::newInstance()->_getForm('pc_new');
            }
        ?>
		<div class="clearfix">
			<span style="margin-left:10px;">
			<input type="checkbox" name="new" id="new" value="1" <?php if(@$detail['b_new'] == 1) { echo 'checked="yes"'; } ?> /> 
			</span>
			<label><?php _e('New', 'cars_attributes'); ?></label>
		</div>
    </div>   
    
</div>
